#ifndef LOGIC_LIST_H
#define LOGIC_LIST_H

#include <iostream>
#include <string>
#include <vector>

#include "Parser.h"
#include "Data.h"
#include "Task.h"
#include "Writer.h"

#include <boost\date_time.hpp>

using namespace std;
using namespace boost::posix_time;
using namespace boost::gregorian;

class LogicList {
public:
	string listAllTasks(Parser::PARSED_COMMAND parsedCommand, 
							vector<Task>& tasksVector,
							Data* _data,
							Writer* _writer);

	string listTaskBySearchTerm(Parser::PARSED_COMMAND parsedCommand, 
							vector<Task>& tasksVector,
							Data* _data,
							Writer* _writer);

	string listTaskByDay(Parser::PARSED_COMMAND parsedCommand, 
							vector<Task>& tasksVector,
							Data* _data,
							Writer* _writer);

	string listTaskByDate(Parser::PARSED_COMMAND parsedCommand, 
							vector<Task>& tasksVector,
							Data* _data,
							Writer* _writer);

	string listTaskNextWeek(Parser::PARSED_COMMAND parsedCommand, 
							vector<Task>& tasksVector,
							Data* _data,
							Writer* _writer);

	string listTaskByMonth(Parser::PARSED_COMMAND parsedCommand, 
							vector<Task>& tasksVector,
							Data* _data,
							Writer* _writer);

	string listTaskByDone(Parser::PARSED_COMMAND parsedCommand, 
							vector<Task>& tasksVector,
							Data* _data,
							Writer* _writer);

private:

	static const string LIST_SUCCESS_MESSAGE;

	static const string LIST_ERROR_MESSAGE;

	static const string NOT_FOUND_ERROR_MESSAGE;

	void copyTasks(vector<Task>& tasks, vector<Task>& tasksVector);

};
#endif